package backend

import (
	"github.com/gogf/gf/v2/frame/g"
)

type PositionCreateReq struct {
	g.Meta    `path:"/backend/position/add" method:"post" tags:"手工位" summary:"创建手工位接口"`
	PicUrl    string `json:"pic_url"`
	Link      string `json:"link"`
	Sort      int    `json:"sort"`
	GoodsName string `json:"goods_name" v:"required#商品名称不能为空" summary:"商品名称"`
	GoodsId   uint   `json:"goods_id" v:"required#商品id不能为空" summary:"商品id"`
}
type PositionCreateRes struct {
	PositionId uint `json:"position_id"`
}

type PositionUpdateReq struct {
	g.Meta    `path:"/backend/position/update/{Id}" method:"put" tags:"手工位" summary:"修改手工位接口"`
	Id        uint   `json:"id"      v:"min:1#请选择需要修改的手工位" dc:"手工位Id"`
	PicUrl    string `json:"pic_url"`
	Link      string `json:"link"`
	Sort      int    `json:"sort"`
	GoodsName string `json:"goods_name" v:"required#商品名称不能为空" summary:"商品名称"`
	GoodsId   uint   `json:"goods_id" v:"required#商品id不能为空" summary:"商品id"`
}
type PositionUpdateRes struct{}

type PositionDeleteReq struct {
	g.Meta `path:"/backend/position/delete" method:"delete" tags:"手工位" summary:"删除手工位接口"`
	Id     uint `v:"min:1#请选择需要删除的手工位" dc:"手工位id"`
}
type PositionDeleteRes struct{}

type PositionGetListCommonReq struct {
	g.Meta `path:"/backend/position/list" method:"get" tags:"手工位" summary:"手工位列表接口"`
	Sort   int `json:"sort" in:"query" dc:"手工位排序"`
	CommonPaginationReq
}

type PositionGetListCommonRes struct {
	List  interface{} `json:"list" description:"列表"`
	Page  int         `json:"page" description:"分页码"`
	Size  int         `json:"size" description:"分页数量"`
	Total int         `json:"total" description:"数据总数"`
}
